#include<bits/stdc++.h>
using namespace std;

class Solution {
public:
    unordered_map<int, int> mp;
    bool containsDuplicate(vector<int>& nums)
    {
        for (int i = 0; i < nums.size(); i++) {
            if (!mp.count(nums[i])) {
                mp[nums[i]] = 1;
            }
            else {
                return true;
            }
        }
        return false;
    }
};